
<div xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:a="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:ctg="http://www.crotouristguide.com/taglib"><ui:composition
	template="/templates/layout/columns_1.xhtml">

	<ui:define name="column1">
		<rich:panel styleClass="blue-panel">
			<s:div styleClass="title"><h1>#{messages['label.add.images']}</h1>
				<h:outputFormat value="#{messages['label.suggest.images.tip']}">
					<f:param value="#{messages[slikaAction.tipCilja]}" />
					<f:param value="#{slikaAction.nazivCilja}" />
				</h:outputFormat>
			</s:div>
			<h:form>
				<rich:fileUpload fileUploadListener="#{slikaAction.processSlika}"
					maxFilesQuantity="10" listWidth="450" id="upload"
					immediateUpload="false" acceptedTypes="jpg, gif, png, bmp"
					allowFlash="false" reRender="slikaList">
					<a:support event="onuploadcomplete" reRender="slikaList" />
				</rich:fileUpload>

				<br />
				<rich:dataGrid id="slikaList" var="s" columns="4"
					value="#{slikaAction.uneseneSlike}" width="100%">

						<s:graphicImage value="#{s.sadrzaj}"
							alt="#{messages['label.image.alt']}">
							<s:transformImageSize width="105" height="75"
								maintainRatio="false" />
						</s:graphicImage>
						<br/>
						<h:commandLink value="#{messages['label.delete']}" rendered="#{identity.hasRole('1') or s.korisnik.idKorisnika == korisnika.idKorisnika}"
							action="#{slikaAction.ukloniSliku(s)}"></h:commandLink>
		
				</rich:dataGrid>
				<br />
				<h:commandButton styleClass="submit"
					value="#{messages['label.objekt.input.button.update']}"
					action="#{slikaAction.azurirajSlike}">
				</h:commandButton>
				<ctg:nbsp/>
				<h:commandButton value="#{messages['label.input.cancel']}"
					action="#{slikaAction.back()}" immediate="true" />
			</h:form>
		</rich:panel>
	</ui:define>
</ui:composition></div>
